package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class MyDB {
    public static void main(String[] args) {
        Schema schema = new Schema(1, "com.lanou3g.myapplication");
        //创建第一张表
        Entity entity = schema.addEntity("BeanData");
        //数据库字段名
        entity.addIntProperty("_id");
        entity.addStringProperty("title");
        entity.addStringProperty("id");
        entity.addStringProperty("content");
        entity.addStringProperty("imageUrl");
        entity.addIntProperty("content_type");
        try {
            new DaoGenerator().generateAll(schema,"./app/src/main/java");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
